package com.ruoyi.resource.controller;

import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.resource.domain.Friend;
import com.ruoyi.resource.service.FriendService;
import com.ruoyi.system.service.ISysUserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 好友
 *
 * @author OpenACloud
 * @create 2024/6/11 9:19
 */
@Anonymous
@RestController
@RequestMapping("/friend")
public class FriendController extends BaseController {

    @Resource
    private ISysUserService userService;

    @GetMapping("/find")
    public TableDataInfo findFriend(SysUser user){
        startPage();
        List<SysUser> userList = userService.selectUserList(user);
        return getDataTable(userList);
    }

}
